using Core;
using IglooCoder.Commons.WcfNhibernate;
using NHibernate;

namespace Infrastucture
{
    public class SubGroupRepository : BaseNHibernateRepository<SubGroup>
    {
        public SubGroupRepository(ISessionStorage sessionStorage)
            : base(sessionStorage)
        {
        }

        public void UpdateEmailStatus(string subGroupId)
        {
            ISQLQuery command =
            Session.CreateSQLQuery("Update SubGroup set HasSent=1 Where SubgroupID='" + subGroupId + "'");
            int res = command.ExecuteUpdate();
        }
    }
}